#{extends 'Admin.html'/}
#{set title:'Admin -> Input App' /}

#{set "moreStyles" }
    <style type="text/css" >
    .crudDelete input {
        background: none repeat scroll 0 0 #CC0000;
        border: medium none;
        border-radius: 8px 8px 8px 8px;
        color: #FFFFFF;
        cursor: pointer;


        margin: 40px 10px 10px 10px ;
        padding: 2px 10px;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 10000
    }
    #adminMain {
        position: relative;
    }
    </style>
#{/set}


<h1>Nhap ung dung</h1>
<div class="adminTitleIntro">Sử dụng đề nhập/sửa một Lĩnh Vực</div>

#{form @AppGroups.save(), class:"simpleForm", enctype:'multipart/form-data', id:"formTopic"}
<input type="hidden" value="${dto.id}" name="dto.id">

<p>
    <label> Language : </label>
    <input type="text" value="${lang}" name="dto.language" disabled="true">
</p>


<p>
    <label> Code : </label> <input type="text" value="${dto.code}" name="dto.code">
</p>

<p>
    <label> Title : </label> <input type="text" value="${dto.title}" name="dto.title">
</p>

<p>
    <label> Order : </label> <input type="text" value="${dto.order}" name="dto.order">
</p>

<p>
    <label> Brief : </label> <input type="text" value="${dto.brief}" name="dto.brief">
</p>

<p>
    <label> Small photo: </label>
    <img src="@{User.getAppGroupImage(dto.id)}" alt="">
    <br>
    <label>&nbsp;</label>
    <input type="file" name="dto.photo">
</p>

<br class="clearfloat">

<div class="controls">
    <input type="submit" value="Save" />
    <input type="button" value="Cancel" onclick="document.href = '/appGroups/list'"/>
</div>
#{/form}

#{if dto.id != null }
    #{form @delete(dto.id)}
    <p class="crudDelete">
        <input type="submit" value="&{'crud.delete', type.modelName}" />
    </p>
    #{/form}
#{/if}